<?php
use common\library\comFun;

?>
<table class="layui-table">
    <colgroup>
        <col>
        <col>
        <col>
        <col>
        <col>
        <col width="150">
        <col width="200">
        <col width="150">
    </colgroup>
    <thead>
    <tr>
        <th>ID</th>
        <th>版本号</th>
        <th>终端类型</th>
        <th>APP类型</th>
        <th>APP下载地址</th>
        <th>更新类型</th>
        <th>发布时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <?php foreach ($list as $data): ?>
        <tr>
            <td><?= $data['version_id'] ?></td>
            <td><?= $data['version_num'] ?></td>
            <td><?php if ($data['terminal_type'] == 'member'): ?>
                    会员端
                <?php else: ?>
                    代理商端
                <?php endif; ?></td>
            <td><?= $data['app_type'] ?></td>
            <td><a href="<?= $data['download_url'] ?>" target="_blank"><?= $data['download_url'] ?></a></td>
            <td><?php if ($data['update_way'] == 'forced'): ?>
                    强制更新
                <?php else: ?>
                    自主更新
                <?php endif; ?></td>
            <td><?= comFun::formatDate($data['create_time']) ?></td>
            <td>
                <a href="/version/view?version_id=<?= $data['version_id'] ?>"
                   class="layui-btn layui-btn-small">查看</a>
            </td>
        </tr>
    <?php endforeach; ?>
    </tbody>
</table>
<div id="o-page" data-pages="<?= $pageArr['pageTotal'] ?>"></div>